<?php
	class Tabla42{

		private $id;
		private $id_empresa;

		private $riesgos;
		private $mercado;
		private $control;
		
		private $archivo;

		public function __construct($id = 0){
			$this->id = $id;
			if($this->id > 0){
				$sql = "SELECT * FROM png_tabla42 WHERE id_empresa = ".$id;
				$query = new Consulta($sql);
				if($query->NumeroRegistros() > 0){
					$row = $query->VerRegistro();
					$this->id_empresa = $row['id_empresa'];

					$this->riesgos = $row['riesgos'];
					$this->mercado = $row['mercado'];
					$this->control = $row['control'];
					
					$this->archivo 	= $row['archivo'];
				}					
			}
		}

		public function __get($atributo){
			return $this->$atributo;	
		}

	}
?>